<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新闻列表</title>
    <link rel="stylesheet" href="__TMPL__/static/css/reset.css">
    <link rel="stylesheet" href="__TMPL__/static/css/style.css">
    <link rel="stylesheet" href="__TMPL__/static/css/news.css">
</head>

<body>
    <div class="container">
        {include file="head" /}
        <div class="banner">
            <img src="{$current_cate['banner']['url']}" alt="">
            <div class="public_width">
                <div class="banner_in">
                    <div class="banner_in_title">
                        <h3>新闻资讯</h3>
                        <div class="banner_in_img">
                            <img src="__TMPL__/static/img/newshtml_bannertext.png" alt="">
                        </div>
                    </div>

                    <p>您的位置：<a href="index.html">首页</a><span>></span><a href="news.html">新闻列表</a></p>
                </div>
            </div>
        </div>

        <div class="news">
            <div class="tab-box">
                <div class="public_width">
                    <a href="{:hcUrl('list/index',['id'=>5])}">
                        <div class="tab-item all-item {$current_cate['id'] == 5 ? 'news_active' : ''}">全部</div>
                    </a>
                    {hcTaglib:subCategory pid="5" field="id,title"}
                    <a href="{:hcUrl('list/index',['id'=>$vo['id']])}">
                        <div class="tab-item company-item {$current_cate['id'] == $vo['id'] ? 'news_active' : ''}">{$vo['title']}</div>
                    </a>
                    {/hcTaglib:subCategory}
                </div>
            </div>
            <div class="public_width">
                <div class="news_box">
                    {hcTaglib:contentPage mainField="id,title,thumbnail,description,publish_time" name="article" limit="5" onlyData="1"}
                        
                        <div class="news_box_top">
                            {volist name="$article['data']" id="vo" length="1"}
                            <div class="news_box_main">
                                <img src="{$vo['thumbnail']['url']}" alt="">
                                <div class="news_box_main_txt">
                                    <a href="{:hcUrl('detail/index',['id'=>$vo['id'],'cid'=>$vo['category_id']])}">{$vo['title']}</a>
                                    <p>{$vo['description']}</p>
                                </div>
                            </div>
                            {/volist}
                            {volist name="$article['data']" id="vo" length="1" offset="1"}
                            <div class="news_box_bin">
                                <div class="news_box_bin_img">
                                    <img src="{$vo['thumbnail']['url']}" alt="">
                                </div>
                                <div class="news_box_bin_txt">
                                    <p class="news_box_time">2021-10-28</p>
                                    <a href="{:hcUrl('detail/index',['id'=>$vo['id'],'cid'=>$vo['category_id']])}" class="news_box_link">
                                        <div class="news_box_link_in">
                                            <h4>{$vo['title']}</h4>
                                            <p>{$vo['description']}</p>
                                        </div>
                                    </a>
                                    <a href="{:hcUrl('detail/index',['id'=>$vo['id'],'cid'=>$vo['category_id']])}" class="news_box_link"></a>
                                    <img src="__TMPL__/static/img/news_box_arrow.png" alt="">
                                    </a>
                                </div>
                            </div>
                            {/volist}
                            
                        </div>
                        <div class="news_box_bottom">
                            {volist name="$article['data']" id="vo" length="3" offset="2"}
                            <div class="news_box_bin">
                                <div class="news_box_bin_img">
                                    <img src="{$vo['thumbnail']['url']}" alt="">
                                </div>
                                <div class="news_box_bin_txt">
                                    <p class="news_box_time">{$vo['publish_time']|date='Y-m-d'}</p>
                                    <a href="{:hcUrl('detail/index',['id'=>$vo['id'],'cid'=>$vo['category_id']])}" class="news_box_link">
                                        <div class="news_box_link_in">
                                            <h4>{$vo['title']}</h4>
                                            <p>{$vo['description']}</p>
                                        </div>
                                    </a>
                                    <img src="__TMPL__/static/img/news_box_arrow.png" alt="">
                                </div>
                            </div>
                            {/volist}

                        </div>
                    {/hcTaglib:contentPage}
                </div>

            </div>
        </div>

        <div class="footer">
            <div class="center">
                <div class="footer_top">
                    <div class="footer_left">
                        <ul>
                            <li>
                                <img src="__TMPL__/static/img/logo.png" class="logo">
                            </li>
                            <li>
                                <img src="__TMPL__/static/img/address.png">
                                <span>地址：上海市杨浦区隆昌路619号</span>
                            </li>
                            <li>
                                <img src="__TMPL__/static/img/email.png">
                                <span>邮箱：106056320@qq.com</span>
                            </li>
                            <li>
                                <img src="__TMPL__/static/img/tel.png">
                                <span>电话：021-58956622</span>
                            </li>
                        </ul>
                    </div>
                    <div class="footer_center">
                        <ul>
                            <li>
                                <h4>品牌介绍</h4>
                            </li>
                            <li>公司简介</li>
                            <li>发展历程</li>
                            <li>资质荣誉</li>
                        </ul>
                        <ul>
                            <li>
                                <h4>产品展示</h4>
                            </li>
                            <li>高端浴缸</li>
                            <li>龙头组合</li>
                            <li>老式混水阀</li>
                            <li>面盆龙头</li>
                            <li>菜盆龙头</li>
                            <li>明装恒温阀</li>
                        </ul>
                        <ul>
                            <li>
                                <h4>新闻中心</h4>
                            <li>公司新闻</li>
                            <li>行业新闻</li>
                            </li>
                        </ul>
                        <ul>
                            <li>
                                <h4>联系我们</h4>
                            </li>
                            <li>联系方式</li>
                            <li>在线留言</li>
                            <li>人才招聘</li>
                        </ul>
                    </div>
                    <div class="footer_right">
                        <img src="__TMPL__/static/img/QRcode.png">
                        <p>扫码关注我们</p>
                    </div>
                </div>
                <div class="bottom">
                    <div class="bottom_left">
                        Copyright © 2021 DESHI All Rights Reserved. 沪ICP备2021024265号 Powered by HuoCMS
                    </div>
                    <div class="bottom_right">
                        Designed by 派流
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- JavaScript -->
    <script src="__TMPL__/static/js/jquery-1.11.3.min.js"></script>
    <script>
        $(document).ready(function () {
            // getType() 
})

        function getType() {
            var url = window.location.search
            var index = url.lastIndexOf('=')
    url = url.substring(index + 1, url.length)
    if (url === 'all') {
                $('.tab-item').removeClass('news_active')
                $('.all-item').addClass('news_active')
                $('#all').show()
                $('#company').hide()
                $('#industry').hide()
            } else if (url === 'company') {
                $('.tab-item').removeClass('news_active')
                $('.company-item').addClass('news_active')
                $('#company').show()
                $('#all').hide()
                $('#industry').hide()
            } else {
                $('.tab-item').removeClass('news_active')
                $('.industry-item').addClass('news_active')
                $('#industry').show()
                $('#all').hide()
                $('#company').hide()
            }
        }
    </script>
</body>

</html>